using System;
using System.Collections.Generic;

using Elev.Core;

namespace Elev.Core.Utility
{
    /// <summary>
    /// Hack, I couldn't do proper ORDER BY in this bloody Sqlite, that I implemented the
    /// IComparer interface, so that I can order items AFTER they are pulled out of the DB
    /// </summary>
    internal class ExamDateComparer : IComparer<Exam>
    {
        #region IComparer<Exam> Members

        public int Compare(Exam x, Exam y)
        {
            if (x.Date > y.Date)
                return 1;
            else if (x.Date < y.Date)
                return -1;
            else
                return 0;
        }

        #endregion
    }
}
